/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "vendertype")
@XmlRootElement(name = "vendertype")
@NamedQueries({
    @NamedQuery(name = "Vendertype.findAll", query = "SELECT v FROM Vendertype v"),
    @NamedQuery(name = "Vendertype.findByVenderTypeID", query = "SELECT v FROM Vendertype v WHERE v.venderTypeID = :venderTypeID"),
    @NamedQuery(name = "Vendertype.findByVendertypename", query = "SELECT v FROM Vendertype v WHERE v.vendertypename = :vendertypename"),
    @NamedQuery(name = "Vendertype.findByIsdeleted", query = "SELECT v FROM Vendertype v WHERE v.isdeleted = :isdeleted")})
public class Vendertype implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "VenderTypeID")
    private Long venderTypeID;
    @Column(name = "vendertypename")
    private String vendertypename;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    
    public Vendertype() {
    }

    public Vendertype(Long venderTypeID) {
        this.venderTypeID = venderTypeID;
    }

    public Long getVenderTypeID() {
        return venderTypeID;
    }

    public void setVenderTypeID(Long venderTypeID) {
        this.venderTypeID = venderTypeID;
    }

    public String getVendertypename() {
        return vendertypename;
    }

    public void setVendertypename(String vendertypename) {
        this.vendertypename = vendertypename;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (venderTypeID != null ? venderTypeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Vendertype)) {
            return false;
        }
        Vendertype other = (Vendertype) object;
        if ((this.venderTypeID == null && other.venderTypeID != null) || (this.venderTypeID != null && !this.venderTypeID.equals(other.venderTypeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Vendertype[venderTypeID=" + venderTypeID + "]";
    }

}
